<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use DB;

class Member extends Model{
	//会员列表
	public function select(){
		$res = DB::table("user")->select("user_id","user_name","user_tel","user_email","login_num","is_show")->paginate(5);
		return $res;
	}
	//查询一条
	public function getOne($user_id){
		$res = DB::table("user")->where("user_id",$user_id)->first();
		return $res;
	}
	//会员编辑
	public function lists_up($data,$user_id){
		$res = DB::table("user")->where("user_id",$user_id)->update($data);
        return $res;
	}
	//会员删除
	public function del($user_id,$data){
		$res = DB::table("user")->where("user_id",$user_id)->update($data);
		return $res;
	}
}